import request from '@/utils/request'
export function getEnterpriseListAPI(params) {
  return request({
    url: '/park/enterprise',
    params
  })
}
export function getIndustryListAPI() {
  return request({
    url: '/park/industry'
  })
}
export function uploadAPI(data) {
  return request({
    url: '/upload',
    method: 'post',
    data
  })
}
export function addEnterpriseAPI(data) {
  return request({
    url: 'park/enterprise',
    method: 'post',
    data
  })
}
export function getEnterpriseDetailAPI(id) {
  return request({
    url: `/park/enterprise/${id}`
  })
}
export function editEnterpriseAPI(data) {
  return request({
    url: '/park/enterprise',
    method: 'PUT',
    data
  })
}
export function delEnterpriseAPI(id) {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'delete'
  })
}
export function getRentListAPI(id) {
  return request({
    url: `/park/enterprise/rent/${id}`
  })
}
export function getRentBuildListAPI() {
  return request({
    url: '/park/rent/building'
  })
}
// export function addRentAPI(data) {
//   return request({
//     url: '/park/enterprise/rent',
//     method: 'post',
//     data
//   })
// }
export function addRentAPI(data) {
  return request({
    url: '/park/enterprise/rent',
    method: 'POST',
    data
  })
}
export function outRentAPI(id) {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'put'
  })
}
export function downloadAPI(id) {
  return request({
    url: `/download/${id}`,
    responseType: 'blob'
  })
}
